package com.xingdata.jjxc.utils;

import android.app.Activity;
import android.content.Context;

/**
 * 
 * @Description: TODO(视图工具类)
 * @date 2015-10-14 上午11:07:10 Creater JiangMin
 */
public class ViewTools {
	private static int width = 0;
	private static int hight = 0;

	public static void initScreen(Context context) {
		if (width == 0) {
			width = ((Activity) context).getWindowManager().getDefaultDisplay()
					.getWidth();
		}
		if (hight == 0) {
			hight = ((Activity) context).getWindowManager().getDefaultDisplay()
					.getHeight();
		}

	};

	/**
	 * 获取屏幕宽度
	 * 
	 * @return
	 */
	public static int getScreenWidth() {
		return width;
	}

	/**
	 * 获取屏幕高度
	 * 
	 * @return
	 */
	public static int getScreenHight() {
		return hight;
	}
}
